Subject: Re: HELP!!! Arexx compiler or C?
From: [email-masked] (Daniel Barrett)
Date: 14 Dec 1993 00:15:02 GMT
Newsgroups: comp.sys.amiga.programmer

In article <[email-masked]> [email-masked] (Michael `SLAM' Glicksman) writes:
>I was wondering, does anyone do any serious programming in arexx? I'm a
>Computer Science major...

	I would never use ARexx for a large project because the variable
scoping is too weird.  All your variables are scoped to the bottom of the
file, right into your subprograms, unless you use the "PROCEDURE" keyword to
protect your subprograms.  But PROCEDURE/EXPOSE looks at the *dynamic* chain,
not the static chain, to determine a variable's scope.  For example, suppose
you want to protect function Funky, but let it access global variable G.  So
you write:

		Funky: PROCECDURE EXPOSE G
			...stuff...
		       return G + 17

Looks fine, right?  Now suppose that function Another calls function Funky.

		Another: PROCEDURE
			return Funky

Notice that function Another does not refer to the variable "G" at all.
Well, tough luck!  You have to EXPOSE G anyway, because Funky needs it.

	Discovering this made me want to tear my hair out.

	Another lovely feature is the conflict between variable names
and record field names.  If you have a record R with a field F, and you
*also* have a variable named F, have fun!

	Yet another feature is that you can't partition your program into
multiple files without incurring a performance hit.  Functions in other files
get loaded from disk while running.  Darn.

>Oh, and there's been something that's been bugging the h*ll outta me for the
>past few months: Is it possible to pass a group of compound variables to a
>procedure?
>	  test.a = 1; test.b = 2; test.c = 3
>	  CALL printout(test)

	I believe you have to write:

		CALL printout(test.)		/* Notice the period */

Another difficulty of ARexx.

	I like ARexx as a scripting language and for its inter-program
communication abilities.  It's mighty powerful for string handling.
But for a large program?  No thanks.

                                                        Dan

 //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
| Dan Barrett -- Dept of Computer Science, Lederle Graduate Research Center |
| University of Massachusetts, Amherst, MA  01003  --  [email-masked] |
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////